//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopDispatchSelfetch, MinishopDispatchSelfetchResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopDispatchSelfetchList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopDispatchSelfetchResponse>(`/uctoo/minishop_dispatch_selfetch/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopDispatchSelfetch = async (id: string) => {
  return requestClient.get<MinishopDispatchSelfetch>(`/uctoo/minishop_dispatch_selfetch/${id}`);
};

export const adductooMinishopDispatchSelfetch = async (data: Partial<MinishopDispatchSelfetch>) => {
  return requestClient.post<MinishopDispatchSelfetch>('/uctoo/minishop_dispatch_selfetch/add', data);
};

export const edituctooMinishopDispatchSelfetch = async (data: Partial<MinishopDispatchSelfetch>) => {
  return requestClient.post<MinishopDispatchSelfetch>('/uctoo/minishop_dispatch_selfetch/edit', data);
};

export const deleteuctooMinishopDispatchSelfetch = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_dispatch_selfetch/del', { id });
};
